package solution;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: ws
 * Date: 2023-01-17
 * Time: 20:18
 */
public class Solution1 {
    public static void main(String[] args) {
        isDays(2000, 3, 15);
    }
    public static void isDays(int year,int month,int day) {
        int[] months = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
        int days = 0;
        for (int i = 0; i < month - 1; i++) {
            days += months[i];
        }
        if (year % 4 == 0 && year % 100 != 0 || year % 400 == 0 && month > 2) {
            days++;
        }
        days += day;
        System.out.println(year + "年" + month + "月" + day + "日" + "是该年的第" + days + "天");
    }
}
